package com.onepower.core.modules.repository.mapper;

import com.onepower.core.modules.repository.entity.SysRoleMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
  * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author kin
 * @since 2018-08-01
 */
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {

    @Select("SELECT menu_id FROM sys_role_menu WHERE role_id=#{roleId}")
    List<Integer> selectMenuByRoleId(@Param("roleId")Integer roleId);

    List<Map<String,String>> selectRoleMenu();
}